home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / elk-2_0.lha / elk-2.0 / contrib / zelk / build next >
Encoding:
Text File  |  1992-11-12  |  2.2 KB  |  89 lines

  1. . ../../config/system
  2. . ../../config/site
  3.  
  4. echo Building Makefile.local...
  5. cat <<EOT >Makefile.local
  6. # Makefile for zelk extensions
  7. # This Makefile was produced by running ./build in this directory!
  8. # EDIT BUILD, not this file.
  9. # modified
  10. # 22sep92
  11.  
  12. # the top level directory of the elk source
  13. ELKTOP=    $elktop
  14.  
  15. # where is the top level directory of the elk source relative to a 
  16. # subdirectory of the current directory.  If ELKTOP is absolute,
  17. # this is ELKTOP, otherwise this is ../$(ELKTOP)
  18. # TOP_SUBDIR=    ../../..
  19. # TOP_SUBDIR=    $(ELKTOP)
  20.  
  21. SHELL=        /bin/sh
  22. TSCM=        $(ELKTOP)/scm
  23. LIBSCM=        $scheme_dir
  24.  
  25. # put target elk before zelk
  26. all:        TOPLEVEL SCM ELK ZELK ZLIB
  27.  
  28. # install modified scheme toplevel
  29. # copy toplevel to $elktop/scm; the top-level/scm install copies it
  30. # from there into $scheme_dir 
  31. # copy basics directly to $scheme_dir because the top level scm install
  32. # does not know about this file.
  33. TOPLEVEL:
  34.         if [ -f \$(TSCM)/toplevel -a ! -f \$(TSCM)/toplevel.old ];\\
  35.         then mv \$(TSCM)/toplevel \$(TSCM)/toplevel.old ; fi
  36.         cp scm/toplevel \$(TSCM)
  37.         cp scm/basics \$(LIBSCM)
  38.         #cp scm/.elkrc \$(HOME)
  39.  
  40. # install SCM library files
  41. SCM:
  42.         echo installing scm library files
  43.         cd scm; set -x; \\
  44.         for i in * ;\\
  45.         do # use diff to check that files are not already copied\\
  46.           ( diff \$\$i \$(LIBSCM)/\$\$i > /dev/null \\
  47.           ||  cp \$\$i \$(LIBSCM)/\$\$i );\\
  48.         done
  49.  
  50.  
  51. # install modified elk source files
  52. ELK:
  53.         cd src-elk; set -x; \\
  54.         for i in *.c ;\\
  55.         do # use diff to check that files are not already copied\\
  56.           ( diff \$\$i \$(ELKTOP)/src/\$\$i > /dev/null \\
  57.           ||  cp \$\$i \$(ELKTOP)/src/\$\$i );\\
  58.         done ;\\
  59.         for i in *.h ;\\
  60.         do # use diff to check that files are not already copied\\
  61.           ( diff \$\$i \$(ELKTOP)/include/\$\$i > /dev/null \\
  62.           ||  cp \$\$i \$(ELKTOP)/include/\$\$i );\\
  63.         done
  64.  
  65. # compile foreign function,vector extensions
  66. ZELK:        Makefile.local
  67.         echo Compiling elk extensions source
  68.         cd src-zelk;make
  69.         echo done compiling elk extensions source
  70.  
  71. # compile library routines used by extensions
  72. ZLIB:
  73.         cd src-zlib;make "ECFLAGS=$cflags" CC=${cc-cc}
  74.  
  75. install:
  76. # null target
  77.  
  78. distclean:
  79.         make -f Makefile.local clean
  80.         
  81. clean:
  82.         -rm src-zelk/*.o src-zelk/Makefile.local
  83.         -rm src-zlib/*.o 
  84.         -rm Zelk.o
  85.         -rm libZ.a
  86.         -rm Makefile.local
  87.  
  88. EOT
  89.